package com.zhao.dao

import com.zhao.entity.ProvinceAndCityInfo
import com.zhao.utils.JdbcUtil
import org.apache.commons.dbutils.QueryRunner

/**
 * Description: 统计各个省份数据量分布情况 dao层特质<br/>
 * Copyright (c) ，2021 ， 赵 <br/>
 * A wet person does not fear the rain. <br/>
 * Date： 2021/1/13 13:45
 *
 * @author 柒柒
 * @version : 1.0
 */

class ProvinceCityDaoImpl extends IProvinceCityDao {

  private val qr: QueryRunner = new QueryRunner(JdbcUtil.getConnectionPool)

  override def save(entity: ProvinceAndCityInfo): Unit = {

    qr.update("insert into `dmp-user-portrait`.tb_province_city_info value(?,?,?) on duplicate key update clickCnt=?",
      entity.provinceName,entity.cityName,entity.clickCnt,entity.clickCnt)
  }
}












